<!DOCTYPE HTML>
<html lang="en">
    <head>
        <title>Hyphenator.js &ndash; Test 128</title>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8">
        <style type="text/css">
            body {
                width:50%;
                margin-left:25%;
                margin-right:25%;
            }
            #test {
                background-color: #ffd6d6;
            }
            #ref {
                background-color: #d6ffd6;
            }
        </style>
        <script src="../Hyphenator.js" type="text/javascript"></script>
        <script type="text/javascript">
            if (parent != window) {
                Hyphenator.config({
                    'onhyphenationdonecallback': function () {
                        var desc = document.getElementById('desc').firstChild.data,
                        msg = {
                            desc: desc,
                            index: 128,
                            result: 'visual'
                        };
                        parent.postMessage(JSON.stringify(msg), window.location.href);
                    }
                });         
            }
            Hyphenator.config({
                hyphenchar:'•',
                urlhyphenchar: "·",
                safecopy: true,
                displaytogglebox: true
            });
            Hyphenator.run();
        </script>
    </head>
    <body>
        <p><a href="index.html">&lt;&lt;- index</a> | <a href="test127.html">&lt;- Prev</a> | <a href="index.html">Next -&gt;</a></p>
        <h1>Test 128</h1>
        <p id="desc">Test oncopy behaviour.</p>

        <div id="test" class="hyphenate" lang="en" oncopy="/*alert('copied')*/">
            Copy the following text:
            <p>An alert saying 'copied' should pop up.</p>
            <p class="urlhyphenate">http://www.domainname.tld/path/to/file.ext</p>
        </div>
        <p class="urlhyphenate">http://www.domainname.tld/path/to/file.ext</p>
        <textarea rows="5" cols="60" placeholder="paste here"></textarea>
    </body>
</html>